Tutorial > Measurement > Acvanced Measurement
Measurement
Advanced Measurement
PCR-M has three different trigger subsystems - TRANsient, SYNChronize, and ACQuire. These features are mapped to SEQuence1, SEQuence2, and SEQuence3 respectively, as the SCPI specification generally categorizes each trigger subsystem as a numbered Trigger Sequence.
The ACQuire (SEQuence3) group is the measurement trigger subsystem.
The PCR-M has the capability to separate measurement initiation and data query. This operation is provided by the sequence 3 group.
State
The following three states are available in the sequence operation.
IDLE state
When the PCR-M is turned on, all the trigger subsystems are in the IDLE state. In this state, the trigger subsystems ignore all triggers. Sending one of the following commands at any time also returns the trigger subsystems to the IDLE state.
The sequence does not start in the IDLE state, even when TRG is sent.
:ABORt (When :INIT:CONT is ON, send the :INIT:CONT OFF;:ABOR.)
IEEE488.1 sdc (Selected Device Clear) or dcl (Device Clear)
INITiated state
If INIT is sent in the IDLE state, the trigger function starts and the PCR-M enters the INITiated state.
If the trigger source is set to IMMediate, measurement or setting is started immediately.
If the trigger source is set to BUS, the PCR-M enters the WTG (Waiting for Trigger) state.
WTG (Waiting for Trigger) state
If a trigger is sent in the WTG state, measurement/setting starts.
If auto continue mode is turned on, measured data is automatically refreshed without having to send the INIT command each time. In normal cases, turn auto continue mode off (default).
If you are using the PCR-M series with firmware version 1.19 or earlier, see here.
When the sequence operation auto continue mode is turned on
If the trigger source parameter is set to IMM, the change or measurement starts immediately. When the operation is complete, a new change or measurement automatically starts. However, if auto continue mode is on, the MEASure, READ, and FETCh queries operate in the same manner. This means that sending multiple FETCh queries results in different measurement results, and simultaneity is lost.
If the parameter is set to BUS, the change or measurement starts after receiving a software trigger. When the operation is complete, the PCR-M waits for the next trigger.
The ABORt command to the measurement function is invalid, because the trigger subsystem automatically exits the IDLE state even if aborted. The *RST/*RCL command resets the continuous operation to off.
When the sequence operation auto continue mode is turned off
The change or measurement currently in progress continues unless ABOR is sent. The operation does not automatically continue to the new change or measurement.
Voltage/Current/Power Measurement
To start a new measurement, set the trigger source to IMMediate and use the INITiate command.
:TRIGger:SEQuence3:SOURce IMMediate | 'Selects trigger source to IMMediate | |
:INITiate:IMMediate:SEQuence3 | 'Initiates a new measurement |
If you want the sequence 3 group to start the measurement on a software trigger, change the trigger source to BUS.
:TRIGger:SEQuence3:SOURce BUS | 'Selects trigger source to BUS | |
:INITiate:IMMediate:SEQuence3 | 'Initiates a new measurement | |
:TRIGger:SEQuence3:IMMediate | 'Gives a software trigger |
When the measurement is completed, measurement data can be queried with the FETCh query commands.
:FETCh:VOLTage:AC? | 'Queries AC voltage in volts, without new measure | |
:FETCh:CURRent:AC? | 'Queries AC current in amps, without new measure | |
:FETCh:POWer:AC:REAL? | 'Queries AC real power in watts, without new measure | |
:FETCh:POWer:AC:APParent? | 'Queries AC apparent power in volt-amps, without new measure |
The TRIGger:SEQuence3:SOURce command sets the trigger source to BUS or IMMediate. The INITiate:IMMediate:SEQuence3 command makes the trigger subsystem leave the IDLE state and go the initiated state. When the Trigger Source is set to IMMediate, the action is executed immediately causing a new measurement to start. When the Trigger Source is set to BUS, the trigger subsystem goes to the WTG (Waiting For Trigger) state. When a software trigger is applied with the TRIGger:SEQuence3:IMMediate or *TRG command, the measurement action is executed. When the operation is completed, the trigger subsystem returns to the IDLE state again. When an ABORt or an equivalent command is sent without executing the trigger, the measurement action is cancelled, and then the trigger subsystem returns to the IDLE state.
The ABORt command and IEEE488.1 sdc/dcl commands simply abort the measurement task that is in progress. It does not have a feature to invalidate any measurement data that has been acquired. On the other hand, the *RST and *RCL commands not only abort the measurement task, but also invalidate the acquired measurement data. This means that the "*RST;:FETC:VOLT:AC?" command line will generate an error, because no measurement data can be fetched and there is no new measurement is scheduled.
The only difference between MEASure and FETCh commands is that the MEASure command starts a new measurement while the FETCh command does not. Availability for measurement items varies depending on the output mode, but it is exactly the same for MEASure and FETCh.
If you are using the PCR-M series with firmware version 1.19 or earlier, see here.
Waiting For Operation Complete
The *OPC command has a capability to wait for an operation to complete. Operation complete means that there is no pending operation that is still in progress. The PCR-M requires at most 330 ms to complete a measurement. While in the measurement in progress, the operation is not in the completed status. When the measurement is completed, the operation is no longer pending. If there is no other operation pending, it can be considered as the Operation Complete status.
When the *OPC command is sent, the PCR-M goes to Operation Complete Command Active State (OCAS). When the measurement is completed and there is no other operation pending, the PCR-M returns to Operation Complete Command Idle State (OCIS) and sets the OPC bit (bit 0) to TRUE (1) on the Standard Event Status Register. This information can be confirmed with the *ESR? query command by checking the OPC bit (bit 0).
The following example makes a new measurement and sends the *OPC. When the measurement is completed, an SRQ (Service Request) is generated, as the Standard Event Status Enable Register and the Service Request Enable Register are unmasked so that an SRQ can be signaled by the Operation Complete event. When using RS232 interface, the SRQ feature cannot be used.
*ESE 1;*SRE 32;*CLS;:INITiate:IMMediate:SEQuence3;*OPC
<Wait for the SRQ to be generated.>
Using the *OPC? query command instead of the *OPC command makes the PCR-M go to Operation Complete Query Active State (OQAS). When the measurement is completed and there is no other operation pending, the PCR-M returns to Operation Complete Query Idle State (OQIS) and sets a response data "1" (in NR1 format ) in the output queue.
INITiate:IMMediate:SEQuence3;*OPC?
<Read the response>
At power-on or after the IEEE488 sdc/dcl, *RST, or *RCL command is sent, the PCR-M is in the OCIS and OQIS state.